{template 'web/_header'}
{template 'tabs'}

<div class="main">
    <div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="./index.php" method="get" class="form-horizontal" role="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="sz_yi" />
                <input type="hidden" name="do" value="plugin" />
                <input type="hidden" name="p"  value="exhelper" />
                <input type="hidden" name="method"  value="short" />
                <input type="hidden" name="op" value="display" />
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
                    <div class="col-xs-12 col-sm-8 col-lg-9">
                        <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">状态</label>
                    <div class="col-xs-12 col-sm-8 col-lg-9">
                        <select name="status" class='form-control'>
                            <option value="1" {if $_GPC['status'] != '0'} selected{/if}>上架</option>
                            <option value="0" {if $_GPC['status'] == '0'} selected{/if}>下架</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-1 control-label">分类</label>
                    <div class="col-sm-8 col-xs-12">
                        {if intval($shopset['catlevel'])==3}
				        	{php echo tpl_form_field_category_3level('category', $parent, $children, $params[':pcate'], $params[':ccate'], $params[':tcate'])}
				        {else}
				        	{php echo tpl_form_field_category_2level('category', $parent, $children, $params[':pcate'], $params[':ccate'])}
				        {/if}
                    </div>
                </div>
                   <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">简称状态</label>
                    <div class="col-xs-12 col-sm-8 col-lg-9">
                        <select name="shortstatus" class='form-control'>
                            <option value="1" {if $_GPC['shortstatus'] == '1'} selected{/if}>已填写</option>
                            <option value="0" {if $_GPC['shortstatus'] == '0'} selected{/if}>未填写</option>
                        </select>
                    </div>
                </div>
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-1 control-label">分类</label>
                    <div class="col-sm-8 col-xs-12">
                        <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
 
    <form action="" method="post">
    <div class="panel panel-default">
        <div class="panel-body table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:60px;">ID</th>
                        <th style='width:350px;'>商品</th>
                        <th>商品简称</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $item}
                    <tr>
                        <td>{$item['id']}</td>
                        <td title="{$item['title']}">
                               {if !empty($category[$item['pcate']])}
                            <span class="text-danger">[{$category[$item['pcate']]['name']}]</span>
                            {/if}
                            {if !empty($category[$item['ccate']])}
                            <span class="text-info">[{$category[$item['ccate']]['name']}]</span>
                            {/if}
                            {if !empty($category[$item['tcate']]) && intval($shopset['catlevel'])==3}
                            <span class="text-info">[{$category[$item['tcate']]['name']}]</span>
                            {/if}
                            <br/><img src='{php echo tomedia($item['thumb'])}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc'/> {$item['title']}</td>
                          <td>
                              {ifp 'exhelper.short.save'}
                              		<input type="text" class="form-control" name="shorttitle[{$item['id']}]" value="{$item['shorttitle']}">
                              {else}
                              		{$item['shorttitle']}
                              {/if}
                          </td>
 
                    </tr>
                    {/loop}
                  <tr>
                    <td colspan='3'>
                           {ifp 'exhelper.short.save'}
	                           	<input name="submit" type="submit" class="btn btn-primary" value="批量修改商品简称">
	                           	<input type="hidden" name="token" value="{$_W['token']}" />
                           {/if}
                    </td>
                </tr>
                
                </tbody>
            </table>
            {$pager}
        </div>
    </div>
        </form>
</div>


{template 'web/_footer'}
